function y = sine(x)
% SINE  function
% x0=ones(n,1);
n=length(x); y=0;
  for i=1:n-1
    y=y+sin(-0.5*x(i+1)+(x(i))^2);
  end
end 